Let mapsend support -s so that the waypoints in my map and in my receiver
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 6 Sep 2002 19:40:44 +0000 (19:40 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 6 Sep 2002 19:40:44 +0000 (19:40 +0000)
match.  Wooo Hooo!

gpsbabel/mapsend.c

index 3e6267b19335a03870beb6ba504e623e0b5c159b..d5d9d0d9c87eec8f72f455f2f16fa4b46c13f380 100644 (file)
@@ -244,11 +244,13 @@ mapsend_waypt_pr(waypoint *waypointp)
        double falt;
        double flong;
        double flat;
-static int cnt = 0;
+       static int cnt = 0;
+       const char *sn = global_opts.synthesize_shortnames ? 
+               mkshort(waypointp->description) : waypointp->shortname;
 
-       c = strlen(waypointp->shortname);
+       c = strlen(sn);
        fwrite(&c, 1, 1, mapsend_file_out);
-       fwrite(waypointp->shortname, c, 1, mapsend_file_out);
+       fwrite(sn, c, 1, mapsend_file_out);
 
        c = strlen(waypointp->description);
        fwrite(&c, 1, 1, mapsend_file_out);